-- GENERATED SPELL FOR [Ravenclaw Regent] --


function spell0_2283(pUnit, Event) --@Dominate Mind,n/a--
pUnit:FullCastSpellOnTarget(7645,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2283', 12000, 1)
end

function spell1_2283(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(970,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2283', 18000, 1)
end

function Sorts_2283(pUnit, Event)
local choix_sorts_2283 = math.random(0, 1)
if choix_sorts_2283 == 0 then
pUnit:RegisterEvent('spell0_2283', 1, 1)
end
if choix_sorts_2283 == 1 then
pUnit:RegisterEvent('spell1_2283', 1, 1)
end
end

function mob2283_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2283', math.random(1500, 3000), 1)
end

function mob2283_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2283_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2283_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2283, 1, 'mob2283_Action')
RegisterUnitEvent(2283, 2, 'mob2283_Leave')
RegisterUnitEvent(2283, 3, 'mob2283_Kill')
RegisterUnitEvent(2283, 4, 'mob2283_Die')
